package com.eric.study.reactor.service;

import com.eric.study.reactor.entity.User;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/**
 * <p> UserService.
 *
 * <p>
 * change history:
 *
 * <pre>
 * date         defect       person          comments
 * --------------------------------------------------------------------------------
 * 2023/9/20    ********     Qiheng Zhang    create file.
 * </pre>
 *
 * @author Qiheng Zhang
 * @date 2023/9/20 15:25
 * @copyright 2023, FA Software (Shanghai) Co., Ltd. All Rights Reserved.
 * @since 1.0.0
 */
public interface UserService {

    // 根据 id 查询用户
    Mono<User> getUserById(int id);

    // 获取所有的用户
    Flux<User> allUser();

    // 新增用户
    Mono<Void> addUser(Mono<User> user);
}
